package org.tema.web;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

public class Status {
	
	public static void addFatal(String message) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, message, null));
	}
	
	public static void addError(String message) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, message, null));
	}
	
	public static void addWarning(String message) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, message, null));
	}
	
	public static void addInfo(String message) {
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(message));
	}

}
